package com.oscar.web.dao;

import com.oscar.web.domain.AverageBooksScore;
import com.oscar.web.domain.Book;
import com.oscar.web.domain.RateMoreRecentlyBooks;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;

import java.util.List;

/**
 * 定义一个接口访问数据库表(和数据库表打交道)
 */

public interface AverageBooksScoreRepository extends Repository<AverageBooksScore, Integer> {

    //返回值 方法名 方法参数
    public Page<AverageBooksScore> findAll(Pageable pageable);

//    public List<AverageBooksScore> findTopByAvg(int num);

    Page<AverageBooksScore> findByOrderByAvgDesc(Pageable pageable);

}
